#define _CRT_SECURE_NO_WARNINGS	


int trailingZeroes(int n)
{
    int count = 0;
    for (long long i = 5; i <= n; i += 5)
    {
        int tmp = i;
        while (i > 4)
        {
            if (tmp % 5 == 0)
            {
                count++;
                tmp /= 5;
            }
            else
                break;
        }
    }
    return count;
}